﻿using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace Honest.MES.WPF.Converters
{
    public class BooleanToStyleConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is bool isCategory && isCategory && parameter is Style categoryStyle)
            {
                return categoryStyle;
            }

            return DependencyProperty.UnsetValue;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}